<?php
// +----------------------------------------------------------------------
// | WoShiMaiJia Projcet 
// +----------------------------------------------------------------------
// | Copyright (c) 2010 http://woshimaijia.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: xinqiyang <517577550@qq.com>
// +----------------------------------------------------------------------
/**
 * 后台首页
 * @author xinqiyang
 * @date   2010-7-3
 *
 */
class IndexAction extends AdminBaseAction{
	
    public function index()
    {
    	$data['serverSoft'] = $_SERVER['SERVER_SOFTWARE'];
        $data['serverOs'] = PHP_OS;
        $data['phpVersion'] = PHP_VERSION;
        $data['phpUploadSize'] = ini_get('file_uploads') ? ini_get('upload_max_filesize'): '禁止上传';
        $data['serverUri'] = $_SERVER['SERVER_NAME'];
        $data['maxExcuteTime'] = ini_get('max_execution_time').' 秒';
        $data['maxExcuteMemory'] = ini_get('memory_limit');
        $data['phpGpc'] = get_magic_quotes_gpc() ? '开启' : '关闭';;
        $data['excuteUseMemory'] =  function_exists('memory_get_usage') ? byte_format(memory_get_usage()) : '未知';
        $dao = new Model();
        $getMysqlVersion = $dao->query('select version()');
        $data['mysqlVersion'] = $getMysqlVersion[0]['version()'];
        $data['sys_version'] = '1.1.0';
        $data['notepad'] = 'userinfo';
        $this->assign($data);
        
        
        
    	$this->display();
    }
    
    /**
     * 更新备忘信息
     *
     */
    public function updateNotepad()
    {
        $notepad = substr($_POST['notepad'], 0, 2000);
//        $dao = M('Admin');
//        if($daoCreate = $dao->create())
//        {
//            $dao->notepad = $notepad;
//            $dao->id = parent::_getAdminUid();
//            $daoSave = $dao->save();
//            if(false !== $daoSave)
//            {
//               die('ok');
//            }else
//            {
//                die('更新失败');
//            }
//        }else
//        {
//           die($dao->getError());
//        }
        die('OK');
    }


}
?>